<?
include('../controller/handler.php');
include('../controller/philomousia.php');
include('../scaffold/link.php');

include('../module/var.inc.php');

$hd = new Handler();
$ph = new Philomousia();
$base_url = $hd->getBaseURL();
$hd->openDB();
$sites = $ph->loadLinks($hd);
$hd->closeDB();

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
<head>
	<? include('../module/head.inc.php'); ?>
</head>

<body>
<div id="link"></div>
<div id="content">

<?include('../module/header.inc.php');?>
<?if(count($sites)>0) {?>
<?foreach($sites as $link) {?>
<div class="site">
	<div class="upper_bar_main"><div class="upper_bar_round"></div></div>
	<div class="body_main_left">
	<div class="body_main_right">
	<div class="body_main">
	<p class="link_url"><a href="<?echo $link->getURL();?>"><?echo $link->getURL();?></a></p>
	<p class="link_description"><?echo $hd->makeHTML($link->getDescription());?></p>
	</div></div></div>
	<div class="lower_bar_main"><div class="lower_bar_round"></div></div>
</div>
<?}?>
<?}?>

<? include('../module/footer.inc.php'); ?>
</div>
<? include('../module/analytics.inc.php'); ?>
</body>
</html>
